package com.kinghood.productcenter.service.product;

import com.baomidou.mybatisplus.extension.service.IService;
import com.kinghood.productcenter.common.model.dao.product.ProductSkuBaseDO;
import com.kinghood.productcenter.common.model.dao.product.ProductSkuSupplierBaseDO;
import com.kinghood.productcenter.common.model.dto.product.ProductSupplierReqDTO;
import com.kinghood.productcenter.common.model.vo.base.BaseAttributeVO;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 服务类
 * </p>
 *
 * @author KingHood
 * @since 2023-12-20
 */
public interface IProductSkuSupplierBaseService extends IService<ProductSkuSupplierBaseDO> {

    /**
     * 供应商
     *
     * @param skuSupplierList 供应商
     * @param productId 商品
     * @param skuMap      sku
     * @param attributeVOMap 属性
     * @param oldSupplierMap 旧数据
     * @author zfj
     * @date 2023/12/25
     */
    void addSkuSupplier(List<ProductSupplierReqDTO> skuSupplierList, Long productId, Map<String, ProductSkuBaseDO> skuMap, Map<String, BaseAttributeVO> attributeVOMap, Map<String, Long> oldSupplierMap);

    /**
     * 删除
     *
     * @param productId 商品id
     * @param idList id
     * @author zfj
     * @date 2023/12/26
     */
    void deleteByProductId(Long productId, List<Long> idList);

    /**
     * 旧数据idMap
     *
     * @param id 商品id
     * @return sku
     * @author zfj
     * @date 2024/1/11
     */
    Map<String, Long> getSupplierByProductId(Long id);
}
